﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EzDesk.Utility.EzML.Model
{
    public class EzText : EzFeedContent
    {
        public string Content { get; set; }
        public string Style { get; set; }

        public override string ToString()
        {
            string text = null;
            if (this.HasChildren)
            {
                StringBuilder sb = new StringBuilder();
                foreach (var txt in this.Children)
                {
                    sb.Append(txt.ToString());
                }
                text = sb.ToString();
            }
            else
            {
                text = Content;
            }
            return GetStyledString(text, this.Style);
        }

        public string GetStyledString(string text, string style)
        {
            // todo: 做点什么来处理字体的Style
            return text;
        }
    }
}
